package com.wsl.sharding.pojo;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "db_table")
public class DbTable {
    @Id
    private int tableId;
    private String tableName;
    private int dbId;
    private String startId;
    private  String endId;

    public int getTableId() {
        return tableId;
    }

    public void setTableId(int tableId) {
        this.tableId = tableId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public int getDbId() {
        return dbId;
    }

    public void setDbId(int dbId) {
        this.dbId = dbId;
    }

    public String getStartId() {
        return startId;
    }

    public void setStartId(String startId) {
        this.startId = startId;
    }

    public String getEndId() {
        return endId;
    }

    public void setEndId(String endId) {
        this.endId = endId;
    }

    public DbTable(int tableId, String tableName, int dbId, String startId, String endId) {
        this.tableId = tableId;
        this.tableName = tableName;
        this.dbId = dbId;
        this.startId = startId;
        this.endId = endId;
    }

    public DbTable() {
    }

    @Override
    public String toString() {
        return "DbTable{" +
                "tableId=" + tableId +
                ", tableName='" + tableName + '\'' +
                ", dbId=" + dbId +
                ", startId='" + startId + '\'' +
                ", endId='" + endId + '\'' +
                '}';
    }
}
